package dfbz.异常处理;

import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class demo02 {
    public static void main(String[] args) {
        try(
              FileWriter fileWriter=new FileWriter(new File("E:\\东方标准\\JAVASE阶段\\JAVASE-CODE\\Day18\\f.txt"),true);
              FileReader fileReader=new FileReader(new File("E:\\东方标准\\JAVASE阶段\\JAVASE-CODE\\Day18\\f.txt"))
        ) {
            fileWriter.write("我爱你");
            int len=0;
            char[]arr=new char[1024];
            while ((len=fileReader.read(arr))!=-1){
                System.out.print(arr);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
